﻿{#foreach $T.Items as lstReport}
<tr class="{COMMON.getRowStyle($T.lstReport$index + 1)}">
    <td>
        {$T.lstReport$index + 1}
    </td>
    <td>
        BICC_REP_{$T.lstReport.Department}_{$T.lstReport.ReportCode}
    </td>
    
    <td id="report{$T.lstReport.ReportId}" style="text-align: left">
        {#if $T.lstReport.RLDescription != ''}
            <a href="javascript:;" class="spanTooltip {COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" title="{$T.lstReport.RLDescription}">{$T.lstReport.ReportName}</a>
        {#else}
            <a class="{COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" href="javascript:;">{$T.lstReport.ReportName}</a>
        {#/if}

        {#if $T.lstReport.Description != null && $T.lstReport.Description != ''}
            <img style="cursor: pointer; float: right;" class="spanTooltip" title="{$T.lstReport.Description}" src="" />
        {#/if}
    </td>
    <td>
        {$T.lstReport.Frequency}
    </td>    
    
    <td style="text-align: center">
        {COMMON.jSonDateToString($T.lstReport.DateExpire, 0)} 
    </td>
    <td>
        <a href="mailto:{$T.lstReport.Account}">{$T.lstReport.Account}</a>
    </td>
    <td>
        <a href="mailto:{$T.lstReport.AccountBackup}">{$T.lstReport.AccountBackup}</a>
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.AccountUpload != null}
        {$T.lstReport.AccountUpload}
        {#/if}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.DateUpload != null}            
            {COMMON.jSonDateToString($T.lstReport.DateUpload, 2)}
        {#/if}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.StatusComplete == 'On Time'}
            <img title="On Time" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Delay'}
            <img title="Delay" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Pending'}
            <img title="Pending" src="" />            
        {#elseif $T.lstReport.StatusComplete == 'Ongoing'}
            <img title="Ongoing" src="" />            
        {#else}
            {$T.lstReport.StatusComplete}
        {#/if}
    </td>
    <td>
        {#if $T.lstReport.DateUpload != null}
        <a href="javascript:void(0)" onclick="page_Report.download('{$T.lstReport.FileName}');">
            <img src="" /></a>                
        {#/if}
    </td>
</tr>
{#/for}